<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateActivityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->text('name', 50)->comment('名称');
            $table->tinyInteger('status', false, true)->default(1)->comment('状态 0-禁用 1-启用');
        });
        \DB::statement("ALTER TABLE `activity` comment '活动表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('activity');
    }
}
